import React, { PureComponent } from 'react';
import MCanvas from './components/wwwCanvas';

export default class ManageMap extends PureComponent {
    constructor(props) {
        super(props);
        this.state = {};
    }


    componentDidMount() {
        const wsUrl = 'ws://127.0.0.1:7699';
        const ws = new WebSocket(wsUrl, 'ws');
        ws.onopen = function () {
            console.log('1');
        };
        ws.onmessage = (msg) => {
            console.log(msg);
        };

        ws.onclose = () => {
            console.log('close');
        };
    }
    render() {
        return (
            <div className="manage-map-page">1
1
            <MCanvas />
1
            </div>
        );
    }
}
